package com.szdvte.news.action.client;

import java.util.Date;
import java.util.List;

import com.szdvte.news.bean.Comments;
import com.szdvte.news.service.ICommentsService;
import com.szdvte.news.util.WiterUtil;

public class CommentsClientAction {
	private Comments comments;
	private ICommentsService commentsService;
	private List<Comments> list;
	public void select(){
		list = commentsService.selectComments(comments);
		WiterUtil.witer(list, "comments");
	}
	public void add(){
		comments.setCommentsData(new Date());
		WiterUtil.response(commentsService.add(comments)+"");
	}
	public Comments getComments() {
		return comments;
	}
	public void setComments(Comments comments) {
		this.comments = comments;
	}
	public ICommentsService getCommentsService() {
		return commentsService;
	}
	public void setCommentsService(ICommentsService commentsService) {
		this.commentsService = commentsService;
	}
}
